package com.homedo.microservice.open.service.gateway.manager.web.cas.model;

import org.springframework.security.core.GrantedAuthority;

import java.util.List;

/**
 * 权限信息
 *
 * @author jgshun
 */
public class AuthorityInfo implements GrantedAuthority {

    /**
     * 扩展角色，代表用户拥有的可访问资源
     */
    public static final String ROLE_RESOURCE = "_def_role_resources";

    /**
     * 角色信息
     */
    private String authority;

    /**
     * 用户资源列表
     */
    private List<String> resources;

    public AuthorityInfo(String authority) {
        this.authority = authority;
    }

    @Override
    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    public List<String> getResources() {
        return resources;
    }

    public void setResources(List<String> resources) {
        this.resources = resources;
    }
}
